package me.codegenerator2.modules.monitor.util;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhongfs
 */
public class RedisKeyPreclude {
    public static List<String> getRedisKeyPrecludeList() {
        List<String> resultList = new ArrayList<>();
        resultList.add("role::loadPermissionByUser");
        resultList.add("user::loadUserByUsername");
        resultList.add("online-token");
        resultList.add("code-key");
        resultList.add("refresh");
        resultList.add("auth");
        resultList.add("CART");
        return resultList;
    }

    public static boolean checkIfIn(List<String> list, String string) {
        boolean flag = false;
        for (String str : list) {
            if (str.contains(string) || string.contains(str)) {
                flag = true;
                break;
            }

        }
        return flag;
    }

}
